/**
 * File: geomagnetic.h
 * Brief: this is working for deal the message of geomagnetic sensor.
 * Created by: zhangping
 * Created at: 2017.07.10
 * Modified by:
 * Modified at:
 **/


#ifndef _GEOMAGNETIC_H_
#define _GEOMAGNETIC_H_

#include "geometry_msgs/Quaternion.h"
#include "protocol.h"

extern "C++" 
{
    // The position of Geomagnetic sensor is biased. This value if used to repair it.
    const double kGeomagneticOffset = -1.12;

    bool IsValidGeomag(const GeomagneticData &data);
    void ShowGeomag(const GeomagneticData &data);
    bool GeomagToQuaternion(const GeomagneticData &data, geometry_msgs::Quaternion &quat);

}

#endif // #ifndef _SerialStream_h_
